package com.ruoyi.safe.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.safe.domain.vo.BizSafeDocAttachVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 业内资料目录-详情对象 biz_catalog_detail
 * 
 * @author ruoyi
 * @date 2023-12-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BizCatalogDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 目录id */
    @Excel(name = "目录id")
    private Long catalogId;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 创建机构 */
    @Excel(name = "创建机构")
    private Long deptId;

    /** 是否需要创建下级 */
    @Excel(name = "是否需要创建下级")
    private String createJunior;

    /** 父级id */
    @Excel(name = "父级id")
    private Long parentId;
    /**
     * 祖级列表
     */
    private String ancestors;
    /**
     * 排序
     */
    private Integer sort;

    @JsonIgnore
    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 部门名称*/
    private String deptName;

    /** 安全资料文档 */
    private List<BizSafeDocAttachVO> bizSafeDocAttachList = new ArrayList<>();

    /** 获取节点路径 */
    public String getPath(){
        return this.getAncestors() + "," + this.getId();
    }

}
